<% if @cultural_heritage_collections.size > 0 %>
  
  <table class="paginated_table sorted_table">

    <thead>
      <tr>
        <th>Nombre</th>
        <th>Descripción</th>
        <th>Tamaño Original</th>
        <th>Tamaño Actual</th>
        <th>Propietario</th>
        <th>Estado</th>
        <th>Institución Cultural</th>
        <th style="min-width: 110px">Acciones</th>
      </tr>
    </thead>

    <tbody>
  <% @cultural_heritage_collections.each do |cultural_heritage_collection| %>
    <tr>
      <td><%= cultural_heritage_collection.name %></td>
      <td><%= cultural_heritage_collection.description %></td>
      <td><%= cultural_heritage_collection.original_size %></td>
      <td><%= cultural_heritage_collection.current_size %></td>
      <td><%= cultural_heritage_collection.str_owner %></td>
      <td><%= cultural_heritage_collection.str_state %></td>
      <td><%= cultural_heritage_collection.str_cultural_institution %></td>
      <td>
        <%= link_to image_tag("navi/search-16-ns.png", :border => 0, :title => 'Mostrar'), cultural_heritage_collection %>
        <% if user_signed_in? && CulturalHeritage::CollectionsController.edit_roles.include?(current_user.role)%>
          <%= link_to image_tag("navi/pencil-16-ns.png", :border => 0, :title => 'Editar'), edit_cultural_heritage_collection_path(cultural_heritage_collection) %>
          <%= link_to image_tag("navi/cross-16-ns.png", :border => 0, :title => 'Eliminar'), cultural_heritage_collection, :confirm => 'Esta Seguro?', :method => :delete %>
          <%= link_to image_tag("navi/0001-arrow-branch-bgr-16-ns.png", :border => 0, :title => 'Asignar'), :controller=>"/cultural_heritage/collections",:action => 'assing',:id =>cultural_heritage_collection.id %>
        <%end%>
      </td>
    </tr>
  <% end %>
    </tbody>
  </table>

<% else %>
  <p>Ninguna colección encontrada</p>

<% end %>